From 8adde1d0c5aa2783455226fec6cd1b679dcaecab Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sun, 2 Apr 2006 09:48:04 +0100 Subject: [PATCH] Define __XEN_INTERFACE_VERSION__ when building Xen. Signed-off-by: Keir Fraser --- xen/include/public/xen-compat.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/include/public/xen-compat.h b/xen/include/public/xen-compat.h index 67af72b344..c4f235095d 100644 --- a/xen/include/public/xen-compat.h +++ b/xen/include/public/xen-compat.h @@ -9,10 +9,20 @@ #ifndef __XEN_PUBLIC_XEN_COMPAT_H__ #define __XEN_PUBLIC_XEN_COMPAT_H__ -#ifndef __XEN_INTERFACE_VERSION__ +#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030101 + +#if defined(__XEN__) +/* Xen is built with matching headers and implements the latest interface. */ +#define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__ +#elif !defined(__XEN_INTERFACE_VERSION__) +/* Guests which do not specify a version get the legacy interface. */ #define __XEN_INTERFACE_VERSION__ 0x00000000 #endif +#if __XEN_INTERFACE_VERSION__ > __XEN_LATEST_INTERFACE_VERSION__ +#error "These header files do not support the requested interface version." +#endif + #if __XEN_INTERFACE_VERSION__ < 0x00030101 #undef __HYPERVISOR_sched_op #define __HYPERVISOR_sched_op __HYPERVISOR_sched_op_compat -- 2.30.2